package api.actions;

import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JFileChooser;

import api.Interface;
import api.image.MyImage;

public class SaveAs {
	public static void run(){
		MyImage image = Interface.getSelectedImage();
		
		//Interface.FileChooser.setSelectedFile(image.extension);
		
		int value = Interface.FileChooser.showSaveDialog(Interface.frame);
		if (value == JFileChooser.APPROVE_OPTION) {
			//image.cambiarFile(MainWindow.chooser.getSelectedFile());
			
			//ImageIO.write(image.img, image.format, image.getFileCompleto());
			image.saved = true;
			//MainWindow.changeImageTitle(image);
		}
	}
}
